{% extends "base.html" %}
{% import "bootstrap/wtf.html" as wtf %}
{% import "_macros.html" as macros %}
{% import "_my_wtf_macros.html" as my_wtf_macros %}

{% block title %}万屏时代OPC--虚拟号话单列表(联通){% endblock %}

{% block panel_heading %}
  万屏时代OPC--虚拟号话单列表(联通)
{% endblock %}

{% block panel_body %}

    <form id="search-call-order-form"
          action="{{ url_for('axb_bp.call_order_lt') }}"
          method="post" class="form" role="form">
        {{ my_wtf_macros.form_field(form.outer_user, div_col=4, label_col=4, field_col=7) }}
        {{ my_wtf_macros.form_field(form.caller, div_col=4, label_col=4, field_col=7) }}
        {{ my_wtf_macros.form_field(form.called, div_col=4, label_col=4, field_col=7) }}
        {{ my_wtf_macros.form_field(form.call_result, div_col=4, label_col=4, field_col=7) }}
        <div class="btn-group pull-right">
            <span>
                <button type="submit" class="btn btn-info"
                        id="query-user-btn">
                查询
            </button>
            </span>
        </div>
    </form>

    <div><span class="label label-default">当前移动捕获外部工程商数目:{{ outer_user_num_yd }}</span></div>
    <div><span class="label label-default">当前联通捕获外部工程商数目:{{ outer_user_num_lt }}</span></div>

    {% if pagination %}
    <div class="pagination">
        {{ macros.pagination_widget(pagination, 'axb_bp.call_order_lt', **url_kwargs) }}
    </div>
    {% endif %}

    <table id="cancel-attention-user-info-table" class="table table-bordered table-hover table-condensed table-striped">
        <thead>
            <tr>
                <th>主叫真实号码</th>
                <th>主叫分配号码</th>
                <th>被叫真实号码</th>
                <th>被叫分配号码</th>
                <th>通话状态</th>
                <th>通话时长</th>
                <th>是否外部工程商</th>
                <th>通话录音 URL</th>
                <th>拨打时间</th>
            </tr>
        </thead>
        <tbody>
            {% for i in items %}
            <tr>
                <td>{{ i.caller }}</td>
                <td>{{ i.caller_show }}</td>
                <td>{{ i.called }}</td>
                <td>{{ i.called_show }}</td>
                <td>{{ i.call_result_display }}</td>
                <td>{{ i.call_duration }}</td>
                <td>{{ i.outer_user_display }}</td>
                <td>{{ i.record_file_url }}</td>
                <td>{{ i.begin_time }}</td>
            </tr>
            {% endfor %}
        </tbody>
    </table>

    {% if pagination %}
    <div class="pagination">
        {{ macros.pagination_widget(pagination, 'axb_bp.call_order_lt', **url_kwargs) }}
    </div>
    {% endif %}

{% endblock %}

{% block scripts %}
{{ super() }}
{% endblock %}

